fix(minio): Use wait strategy instead of deprecated decorator#899
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #899 +/- ##
=======================================
Coverage 79.78% 79.78%
=======================================
Files 14 14
Lines 1182 1182
Branches 184 184
=======================================
Hits 943 943
Misses 197 197
Partials 42 42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
79bff0f to
3903509
Compare
|
@mschmitzer I see this PR is good to go. And I saw you've already done a commit for redis container. Can you please create a PR for that too? |
Glad to hear that 👍 |
|
@artem-ilin Can we proceed with this and #914 ? |
|
@mschmitzer hi! I'm not a maintainer, even not a contributor yet :) On my side I am also waiting for a #915 to be approved (the same fix for Elasticsearch container) UPD: to be honest I'm looking forward to your redis PR to be merged |
|
Ah, I see. So I guess I should ping @alexanderankin 😄 |
🤖 I have created a release *beep* *boop* --- ## [4.14.0](testcontainers-v4.13.3...testcontainers-v4.14.0) (2026-01-07) ### Features * Add ExecWaitStrategy and migrate Postgres from deprecated decorator ([#935](#935)) ([2d9eee3](2d9eee3)) ### Bug Fixes * add ruff to deps ([#919](#919)) ([5853d32](5853d32)) * **cassandra,mysqk,kafka:** Use wait strategy instead of deprecated wait_for_logs ([#945](#945)) ([b7791b9](b7791b9)) * **core:** recreate poetry lockfile with latest versions of libraries ([#946](#946)) ([9a97385](9a97385)) * **elasticsearch:** Use wait strategy instead of deprecated decorator ([#915](#915)) ([c785ecd](c785ecd)) * **minio:** minio client requires kwargs now ([#933](#933)) ([37f5902](37f5902)) * **minio:** Use wait strategy instead of deprecated decorator ([#899](#899)) ([febccb7](febccb7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…943) # fix(mongodb): Use wait strategy instead of deprecated wait_for_logs ## Summary Replace the deprecated `wait_for_logs` function with `LogMessageWaitStrategy` in the MongoDB container module. This is part of a fix for #874 and similar to: - #899 (MinIO - merged) - #915 (Elasticsearch - merged) - #935 (Postgres - merged) - #903 (Kafka/Redpanda - open) - #914 (Redis - open) - #941 (Redis - open) ## Changes - Import `LogMessageWaitStrategy` instead of `wait_for_logs` - Pass `_wait_strategy=LogMessageWaitStrategy(...)` to parent constructor - Override `_connect()` with empty implementation (DbContainer's base implementation uses SQLAlchemy which doesn't apply to MongoDB) ## Testing All existing MongoDB tests pass: ``` poetry run pytest modules/mongodb/tests/ -v ======================== 4 passed in 16.26s ======================== ``` No deprecation warnings from testcontainers after this change. Co-authored-by: David Ankin <daveankin@gmail.com>
Part of fixing #874.